package com.xxx.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.json.JSONObject;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONObject;

import com.xxx.biz.LoginfoBiz;
import com.xxx.biz.impl.LoginfoBizImpl;
import com.xxx.dao.LoginfoDao;
import com.xxx.dao.impl.LoginfoDaoImpl;
import com.xxx.pojo.Loginfo;

public class RegServlet extends HttpServlet {
	private String errorMsg;

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html");
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		
		JSONObject jsonObject=null;
		List<Object> list=new ArrayList<Object>();
		PrintWriter out = response.getWriter();
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("errormessage", "111");
		list.add(map);
		jsonObject=JSONObject.fromObject(map);
		out.print(jsonObject.toString());
		
		out.flush();
		//out.print("{errormessage:'111'}");
		//out.println("{errormessage:'请上传以下类型的文件" + message + "'}");
		out.close();
	}

}
